AssetWise Director Help

Configuring Extended Behavior and Automations for Classes and Templates

The Extended Behavior topic is used to apply certain rules and automations to the selected class or template.

The Extended Behavior topic is available on the following classes:

  • Budgets
  • Change Requests
  • Conditions
  • Contracts
  • Disposition Orders
  • Distribution Orders
  • Documents
  • Events
  • External Objects
  • File Plan Containers
  • Locations
  • Organizations
  • Persons
  • Physical Items
  • Price Lists
  • Programs
  • Projects
  • Restrictions
  • Tags
  • Task Orders
  • Tasks
  • Virtual Items
  • Virtual Item Groups
  • Work Orders
  • Work Tasks

The extended behavior rules that are available depend on the class or template selected.

An automation is a special type of extended behavior that lets you specify custom actions in response to events that occur to objects. Those actions can be in the form of changes to the object or to another object directly related to the object that experienced the event.

You can define automations for classes or templates. If the automation is defined at the class level it will be applied to all objects of that class, regardless of template. If the automation is defined at the template level, the object must have been created from that template and the object’s class must not have been changed since creation from the template.

Note: If the automation is defined at the class level, the object must be an instance of that class.

Automations are applied in the following order of precedence: template > class > scope > default visible scope. In order for an automation to be invoked, the event(s) specified in the automation must occur on the object.

The attribute to change must be of the same type as the object to change.

The WHERE clause defines when, or on which objects the action is to be performed. For example, if the object to change is Documents.Document.ID, then the criteria will have to be Documents.Document <field>.

To Apply Extended Behavior Rules to an Object Class

You can apply extended behavior rules to certain object classes. The rules you can apply depend on the class selected.

  1. Open the System Admin tab (View > System Administration).
  2. Click the Information Modeling icon .
  3. Expand Classes & Attributes.
  4. In the class hierarchy, select the class you want to apply extended behavior rules to.

    You can select a class belonging to any of these parent classes:

    • Change Requests
    • Conditions
    • Distribution Orders
    • Documents
    • Events
    • Physical Items
    • Programs
    • Projects
    • Tags
    • Tasks
    • Virtual Items
    • Virtual Item Groups
    • Work Orders

    The Class form opens in the Content pane. If needed, click the Show all link to show all topics.

  5. Expand the Extended Behavior topic. For example,
    Note: Available options will differ depending on the current object.
  6. Select the options you want. See Extended Behavior Options .
  7. Click the Save icon in the action bar.
    You can also click the Save link at the top of the Extended Behavior topic. The Save link only appears if you make a change on this topic.
    Note: For details on using Approval Work Tasks see Workflow-based Object Approval .

Extended Behavior Options

The available behavior criteria are determined by the object type, and are scope-specific. The following sections display the available behavior options for various object classes.

For a change request class:

  • Warn the user when no...
    • Approval Work Task is selected
      • Require task to be created from this template
  • Auto-close the change request when the final object gets implemented
  • Prevent approval while there are still warnings
  • Instances of this class may only be created in the same scope (as that of the class)
  • Create File Container from this template
    • Automatically create file container when the change request of this class is created

For a distribution order class:

  • Instances of this class may only be created in the same scope (as that of the class)
  • Create File Container from this template
    • Automatically create file container when the distribution order of this class is created

For a document class:

  • Warn the user when no...
    • Physical Item is related
    • Responsibility is defined
    • Electronic File exists
    • File Plan exists
    • Keyword exists
    • Tag exists
    • Identification number is complete
    • Approval Work Task is complete
  • Prevent approval while there are still warnings
  • Instances of this class may only be created in the same scope (as that of the class)
  • ALLOWS approval of a parent document containing not-approved child documents
  • ALLOWS adding/removing child documents to/from an approved parent document
  • Create rendition on approval

For an event class:

  • Warn the user when no...
    • Approval Work Task is selected
      • Require task to be created from this template
  • Prevent approval while there are still warnings
  • Instances of this class may only be created in the same scope (as that of the class)
  • Create File Container from this template
    • Automatically create file container when the event of this class is created

For a physical item class:

  • Warn the user when no...
    • Approval Work Task is selected
      • Require task to be created from this template
  • Prevent approval while there are still warnings
  • Instances of this class may only be created in the same scope (as that of the class)
  • Create File Container from this template
    • Automatically create file container when the physical item of this class is created

For a project class:

  • Instances of this class may only be created in the same scope (as that of the class)
  • Create File Container from this template
    • Automatically create file container when the project of this class is created

For a tag class:

  • Warn the user when no...
    • Approval Work Task is selected
      • Require task to be created from this template
  • Prevent approval while there are still warnings
  • Instances of this class may only be created in the same scope (as that of the class)
  • Create File Container from this template
    • Automatically create file container when the tag of this class is created

For a task class:

  • Prevent approval while there are still warnings
  • Legacy Work Order Behavior
  • Instances of this Class may only be created in the same Scope (as of the Class)
    • Create file container for this type
  • Automatically Create File Container when the Task of this class is created
  • Create Snapshot of Associated Objects on Completion of task with following associations:
    • Input
    • Output
    • Control
    • Mechanism
    • Subject
    • Reaction
    • Closing-Reaction

For a work order class:

  • Prevent approval while there are still warnings
  • Instances of this class may only be created in the same scope (as that of the class)

To Configure Automations on a Template and/or Task

  1. Open the System Admin tab (View > System Administration).
  2. Click the Information Modeling icon .
  3. Expand Classes & Attributes.
  4. In the class hierarchy, select the class or template to which you want to apply extended behavior rules.

    You can select a class belonging to any of these parent classes:

    • Budgets
    • Change Requests
    • Conditions
    • Disposition Orders
    • Distribution Orders
    • Documents
    • Events
    • External Objects
    • File Plan Containers
    • Locations
    • Organizations
    • Persons
    • Physical Items
    • Price Lists
    • Programs
    • Projects
    • Restrictions
    • Tags
    • Task Orders
    • Tasks
    • Virtual Items
    • Virtual Item Groups
    • Work Orders
    • Work Tasks

    The Class or Template form opens in the Content pane. If needed, click the Show all link to show all topics.

  5. Expand the Extended Behavior topic and then click Configure.... For example,
  6. The Automation Configuration dialog appears. For example,
  7. Click New, and then enter a descriptive Name for the automation configuration. For example, "Force Description to Uppercase".
  8. Select the Events tab, and select the appropriate events to which you want to apply this automation, for example, OnObjectAdded and OnObjectChanged. For example,
  9. Select the Actions tab, and then click Add. The Select Automation Actions to Use dialog opens. For example,
  10. Click New. The Automation Action dialog opens.
  11. Enter an appropriate Action Name, for example, "Document Name Uppercase Action", and then select the appropriate Action Type from the list. For example,
    Note: The Action Name must be unique.
    Note: The action automation criteria will differ, depending on the selected Action Type.
  12. Enter the remaining To Change values, as required. For example, if you selected Change Document in the previous step, you would need to:
    1. Select the Document to Change by clicking the Select available columns from a list icon. The Pick Column for Document dialog appears.
    2. Expand the appropriate node in the tree, (Property, Relationship, or RevisionHistory) until you locate and select the column that you want to use, and then click OK.
    3. For each Field Name to which you want to apply this automation, select its Change box in the Values to Set option, and then enter its Value.
  13. Expand Property, select ID, and then click OK.
    Note: Document to Change is the ID of the object to change. ID equates to the document that triggered the action.
  14. Enter the Where statement, and then click OK. For example,
    Note: In this example, an existing document name will also automatically convert to an uppercase name once the changes are saved.
  15. On the Select Automation Actions to Use dialog, select the Automation Action Definition that you just defined, and then click OK to close the Select Automation Actions to Use dialog.
  16. Click OK to close the Automation Configuration dialog.

Notes About Automations

  • Use the same syntax as calculated masks.
  • String literals must be in single quotes: just created will cause an error about an invalid pseudo column, 'just created' will set the value to this string without quotes.
  • Dates and numbers must be cast to strings, again same syntax as calc identifications: CAST($Today AS STRING)
  • You can concatenate values:

    'This document changed by action triggered on work order' + Code + 'on' + CAST($Today AS STRING)

    would produce something like:

    This document changed by action triggered on work order W-00001 on Oct 21 2012 09:30am

  • Code is a pseudo column, in other words will be replaced by the actual code of the object triggering the change, any other searchable column may be used. Use the button to the right of the grid to get a list of available columns.
  • The class for which automations are created determines which object type must be modified to trigger an event.
  • The object to change must be the object that triggers the event or another object directly related to it.
  • The attribute to change must be of the same type as the object to change.
  • The WHERE clause refines the criteria for when or on which objects the action is performed. To create criteria for objects related to the one that triggers the action, the appropriate criteria must be used. In other words, if the object to change is Documents.Document.Id, then the criteria must be Documents.Document.<field> to have any effect.
  • Automation behavior check boxes are as follows:

    • Inherit on child classes or templates – Will ensure that child classes and/or templates apply this automation.
    • Allow manual execution – this functionality is not available as yet.
    • Enabled – if the automation is not enabled it will not be applied.
    • Execute Asynchronously – allows the automation to be applied as a background job without delaying the user while it is being processed.
  • Date Calculation Sample

     DATECALC ( Expression , ( + | - ) Expression , ( DAYS | MONTHS | YEARS ) ) 
  • An alternative would be to change a field on an object different to the one that triggered the action, in this case child documents:

The WHERE clause limits the action to documents on which the event occurred.

  • Set the Date Effective field to the date a document is created. The events to be specified for when the automation should take place are those where an object is created:

    The automation Action Type should be set to Set Object Effectivity and the Date Effective field should be set to the date of the action using the eQL system parameter $Today:

  • Change an attribute of a document that is related to a work order when the work order is changed.

    Define automation on a work order class.

    • To change an attribute, specify which object’s attribute to change – this object must be related to the object that triggers the event, a work order in this case. In this instance, Documents.Document.Id indicates documents related to a work order.
    • The Attribute to Change field is the attribute that must be changed. The list that may be selected from is decided by the type of object in the Object to Change field. In this case change the attribute of a document related to the work order, therefore only document attributes may be selected.
    • The where clause indicates that the action will apply the work order that triggered the event if is still not approved.

Function Syntax

  • IFNULL ( Expression , Expression )
  • UPPER ( Expression )
  • LOWER ( Expression )
  • LENGTH ( Expression )
  • LEFT ( Expression , int )
  • RIGHT ( Expression , int )
  • SUBSTRING ( Expression , int , int )
  • DATECALC ( Expression , ( + | - ) Expression , ( DAYS | MONTHS | YEARS ) )
  • CAST ( Expression AS ( STRING | DATETIME | INTEGER ) [ , literalString ] )
  • CASE Expression WHEN Expression THEN Expression { WHEN Expression THEN Expression } [ ELSE Expression ] END .

Permissible Relational Operators

( = | < | > | >= | <= | >< | ~= ).